package com.itheima.bos.service.take_delivery;

import java.util.Date;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.itheima.bos.domain.page.PageBean;
import com.itheima.bos.domain.take_delivery.Promotion;

public interface PromotionService {

	void save(Promotion model);

	Page<Promotion> findPageData(Pageable pageable);

	/*
	 * 根据page和rows返回分页的数据
	 * 前台查询宣传活动的方法
	 */

	@Path("/pageQuery")
	@Produces({ "application/xml", "application/json" })
	@GET
	PageBean<Promotion> findPageData(
			@QueryParam("page") Integer page,
			@QueryParam("rows") Integer rows);
	
	/*
	 * 使用freemaker来显示宣传活动的具体详情
	 */
	@Path("/promotion/{id}")
	@Produces({ "application/xml", "application/json" })
	@GET
	Promotion findPromotionById(@PathParam("id") Integer id);

	/*
	 * 定时修改宣传活动
	 */
	void updatePromotionStauts(Date date);
	
}
